<cd-modal [modalRef]="modalRef">
  <ng-container i18n
                class="modal-title">Restore Image</ng-container>

  <ng-container class="modal-content">
    <form name="restoreForm"
          class="form"
          #formDir="ngForm"
          [formGroup]="restoreForm"
          novalidate>
      <div class="modal-body">
        <p>
          <ng-container i18n>To restore</ng-container>&nbsp;
          <kbd>{{ imageSpec }}@{{ imageId }}</kbd>,&nbsp;
          <ng-container i18n>type the image's new name and click</ng-container>&nbsp;
          <kbd i18n>Restore Image</kbd>.
        </p>

        <div class="form-group">
          <label class="col-form-label"
                 for="name"
                 i18n>New Name</label>
          <input type="text"
                 class="form-control"
                 name="name"
                 id="name"
                 autocomplete="off"
                 formControlName="name"
                 autofocus>
          <span class="invalid-feedback"
                *ngIf="restoreForm.showError('name', formDir, 'required')"
                i18n>This field is required.</span>
        </div>
      </div>

      <div class="modal-footer">
        <cd-submit-button [form]="restoreForm"
                          (submitAction)="restore()"
                          i18n>Restore Image</cd-submit-button>
        <cd-back-button [back]="modalRef.hide"
                        name="Cancel"
                        i18n-name>
        </cd-back-button>
      </div>
    </form>
  </ng-container>
</cd-modal>
